Pro HTML5 Programming: Powerful APIs for Richer Internet Application Development by Peter Lubbers & Frank Salim & Brian Albers

Pro HTML5 Programming: Powerful APIs for Richer Internet Application Development by Peter Lubbers & Frank Salim & Brian Albers

Author:Peter Lubbers & Frank Salim & Brian Albers [Lubbers, Peter & Salim, Frank & Albers, Brian]
Language: eng
Format: epub
Tags: Computers, Html, Programming Languages
ISBN: 9781430238645
Publisher: Apress
Published: 2011-10-10T04:00:00+00:00


That's an enormous amount of unnecessary network overhead. Consider if we rebuilt the application to use WebSocket, adding an event handler to the web page to asynchronously listen for stock update messages from the message broker (more on that in just a little bit). Each of these messages is a WebSocket frame that has as little as two bytes of overhead (instead of 871). Take a look at how that affects the network overhead in our three use cases.

Use case A: 1,000 clients receive 1 message per second: Network traffic is (2 × 1,000) = 2,000 bytes = 16,000 bits per second (0.015 Mbps)

Use case B: 10,000 clients receive 1 message per second: Network traffic is (2 × 10,000) = 20,000 bytes = 160,000 bits per second (0.153 Mbps)

Use case C: 100,000 clients receive 1 message per second: Network traffic is (2 × 100,000) = 200,000 bytes = 1,600,000 bits per second (1.526 Mbps)



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.